<?php
switch ($value)
{
case 2:
    echo image_tag('green.png');
    break;
case 3:
    echo image_tag('yellow.png');
    break;
case 4:
    echo image_tag('red.png');
    break;
default: echo '';
}
?>